<?php require_once('menu.php'); ?>
<script type="text/javascript">
$().ready(function() {
    $("#adminForm").validate({
        errorLabelContainer: $("#adminForm div.error")
    });
});
</script>
<table width="100%" class="menubar" cellpadding="0" cellspacing="0" border="0">
    <tr>
    <?php
     if (isset($alert)) {
     ?>
        <td class="menudottedline" width="40%">
            <div class="pathway">
                <h3><?=$alert?></h3>
            </div>
        </td>
    <?php
     }
     ?>
        <td class="menudottedline" align="right">
            <table cellpadding="0" cellspacing="0" border="0" id="toolbar">
                <tr height="60" valign="middle" align="center">
                    <td>
                        <a class="toolbar" href="#">
                        <?php echo $html->image('admin/help_f2.png', array('align' => 'middle', 'border' => 0)); ?><br>Help
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<br>
<br>
<div align="center" class="centermain">
    <div class="main">
        <table class="adminheading">
            <tr>
                <th class="user" rowspan="2" nowrap>User Profile</th>
            </tr>
        </table>

        <table class="adminform">
            <tr>
                <td valign="top">
                    <form id="adminForm" name="adminForm" action="<?=$html->url('/admin/uprofile')?>" method="post">
                    <div class="error"></div>
                    <table class="adminlist">
                        <tr>
                            <th colspan=2>User Information</th>
                        </tr>
                        <tr>
                            <td width="20%">Lastname</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="text" name="data[account][lastname]" value="<?php echo $profile['User']['lastname']; ?>" style="width: 400px" title="Please enter your lastname<br/>" class="{required:true}">
                            </td>
                        </tr>
                        <tr>
                            <td>Firstname</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="text" name="data[account][firstname]" value="<?php echo $profile['User']['firstname']; ?>" style="width: 400px" title="Please enter your firstname<br/>" class="{required:true}">
                            </td>
                        </tr>
                        <tr>
                            <td>Email</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="text" name="data[account][email]" value="<?php echo $profile['User']['email']; ?>" style="width: 400px" title="Please enter your email<br/>" class="{required:true,email:true}">
                            </td>
                        </tr>
                        <tr bgcolor="#efefef">
                            <td colspan=2>&nbsp;</td>
                        </tr>
                        <tr>
                            <td>Create New Password</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="password" id="password" name="data[account][password]" style="width: 400px" title="Please enter your password<br/>" class="{required:true}">
                            </td>
                        </tr>
                        <tr>
                            <td>Reenter New Password</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="password" name="data[account][password_confirmation]" style="width: 400px" title="Please enter your confirm password<br/>" class="{required:true}" equalTo="#password">
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td style="border: 1px dotted #ccc; background-color: #efefef;">
                                <input type="submit" value="Update" style="width: 150px;" class="button">
                            </td>
                        </tr>
                    </table>
                    <input type="hidden" name="data[window][uid]" value="<?php echo $uid?>">
                    </form>
                </td>
            </tr>
        </table>
    </div>
</div>
